Repository navigation
docs(skills): teach the record write's text envelope and its organization-language key - #34499
Conversation
…tion-language key Claude-Session: https://claude.ai/code/session_01ADHkmQ4vgatNKAwYizZLG3 Co-authored-by: Claude <noreply@anthropic.com>
…g test pins Claude-Session: https://claude.ai/code/session_01ADHkmQ4vgatNKAwYizZLG3 Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmSXPDB46NVRepWVrL3 Final head for L1 —
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 0085ff5 · 2026-11-16T23:47Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmPmVh4W9sUo12k5XPw 席位核对L1 verdict: ACCEPT — head Checklist conclusions
Contract review (L2) owed?Yes, and still open. Accepted deviations / observations
Landing tier
|
|
l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq Contract reviewServed-tier: Inputs read: card #34434 body and its five comments (two triage notes, the claim and its branch follow-up, the os-dev report 6932800700); PR #34499 body, file list and the net diff against ① Derived judgments
② Semver level
Clause-②: no — correct. Nothing an existing app authors is refused, re-read or re-typed by this diff; ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix.
The three cuts: the pointer to
Nits, none affecting correctness or the contract:
Implemented-by: VERDICT: PASS |
|
repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA Seat record · 2026-11-16T23:52Z · Head-sha: 0085ff5 维护者速读
席位意见:同意合并。每条新句都对照了 #34438 落地的 schema、节点代码和 flows.mdx;三处删除各有别处承载;token 抬升只付实测余额。 席位核对
|
Requested by Steve · project thread
Fixes #34434
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-automation教流程create_record/update_record的字段值可以写成文本信封{ dialect: 'template', source },按组织语言写入;objectstack-i18n写出它的译文键flows.FLOW.records.NODE_ID.fields.FIELD。skills/**。不教的话,中文组织的应用(hotcrm 的工单升级)会继续写英文裸字符串,平台原样存进记录,没人告诉作者有标记文本的写法。skills/objectstack-automation/SKILL.md(Valid-but-silently-wrong 第 1 条新增的六行,以及被删的三处);scripts/check-skills-token-ratchet.mjs(automation 行的抬升与算式);skills/objectstack-i18n/SKILL.md(flows 深层键那一段)。node scripts/check-skills-token-ratchet.mjs,预期 automation 显示6903 / 6903、i18n 显示6219 / 6333,整体通过。skills/**),等你批准后由席位落地。What changes
skills/objectstack-automation/SKILL.md, Valid-but-silently-wrong item 1: after the text-slot paragraph, acreate_record/update_recordfieldsvalue takes a third form, the text envelope{ dialect: 'template', source }, for a sentence people read. Itssourceis a text slot (the paragraph above it:{{ }}holes, a single-brace token refused). It is written in the organization's language (the Localization setting if set, else the app'si18n.defaultLocale; the key lives in objectstack-i18n), never the run starter's; untranslated, the authored text is written; an unreadable setting fails the node. A bare string stays a literal and is never translated. Each clause was read against what feat(automation): a flow writes a field marked as text in the organization's language #34438 landed:FlowRecordFieldValueSchema(packages/spec/src/automation/builtin-node-config.zod.ts),resolveFieldValues(packages/services/service-automation/src/builtin/crud-nodes.ts),resolveOrganizationLocale(packages/core/src/organization-locale.ts) andcontent/docs/automation/flows.mdx§ "Text a record keeps".skills/objectstack-i18n/SKILL.md, the paragraph naming the keys that sit deeper than their group'slabel: it now names three, addingflows.{flow}.records.{node_id}.fields.{field}for a field marked with the text envelope, picked in the organization's language, never the run starter's;os i18n extract --no-objects-onlyscaffolds all three (the walker branch inpackages/lint/src/i18n-walk.ts, pinned bypackages/cli/test/i18n-flow-record-text-coverage.test.ts). The coverage check reads the same walker, so no new wording was needed for it.objectstack-automation/SKILL.md(restatements with another home):label,type,nodesand theedgesFlowSchemarequires:". Survives inreferences/examples-flows.md, whose flows show every top-level key.'helpdesk.aiTriageStub': … // pure — the defaultrow of thefunctionsexample. Survives in the same item: "A flowfunctionis a PURE compute step"; thebilling.syncrow that declareseffect: 'writes'stays.scripts/check-skills-token-ratchet.mjs: theobjectstack-automation/SKILL.mdrow moves 6861 → 6903, the measured remainder after the cuts, pinned at the measurement, with the byte arithmetic in the row comment. Raise path: the standing maintainer ruling 「A:先削重复,余额按实测提高」 (2026-10-27, ruling record 6513306068, letter B). Theobjectstack-i18nrow is unchanged (headroom 187 → 114). The state-introspection route after the State Machines pointer was cut at first and is restored:packages/rest/src/meta-state-route-doc-spelling.test.ts(test:repo) pins this file as one of the route's teaching sites, and Test Core shard 2/8 went red on it at 7101d3c..changeset/34434-skills-flow-record-text.md:'@objectstack/skills': patch.Not in scope: hooks and actions (#34374). No eval case was added (the claim allows at most one per skill; none was needed to carry the teaching, and each would cost tokens in a priced file).
Line and token readings (
skills/**)skills/objectstack-automation/SKILL.mdskills/objectstack-i18n/SKILL.mdskills/*/SKILL.mdLine budget from the claim: net +3 lines on each of the two files; both are within it. Tokens are the ratchet's
ceil(priced bytes / 4), read fromnode scripts/check-skills-token-ratchet.mjsbefore (origin/main 24b6ae5) and after.Tests
None changed or added: the diff is skill text, a ratchet row and a changeset.
pnpm --filter @objectstack/rest exec vitest run --project repoat 0085ff5: 5 files, 300 passed, 23 skipped (it reads this skill).Verification
Gate results at the final head are in the os-dev report on #34434 and in this PR's check runs.